package com.example.campus_order_sb.repository;

import com.example.campus_order_sb.entity.OrderItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderItemRepository extends JpaRepository<OrderItem, Integer> {
    List<OrderItem> findByOrderId(Integer orderId);

    List<OrderItem> findByFoodId(Integer foodId);

    boolean existsByFoodId(Integer foodId);
}